interface IPerson {
  name: string;
  age: number;
  height: number;
}

// const info = {
//   name: "pengfan",
//   age: 21,
//   height: 1.88,
//   address: "chengdushi"
// };

// freshness 擦除
// const p: IPerson = info;

// console.log(info);
// console.log(p);

function printInfo(person: IPerson) {
  console.log(person);
}

// 代码会报错
// printInfo({
//   name: "pengfan",
//   age: 21,
//   height: 1.88,
//   address: "成都市",
// });

const info = {
  name: "pengfan",
  age: 21,
  height: 1.88,
  address: "成都市",
};

printInfo(info)
